﻿@model MaterialProcess
@{
    ViewBag.Title = "入库单维护";
    Layout = "~/Views/Shared/_LayoutFormDetail.cshtml"; 
}
@section Up{
    @Html.HiddenFor(model => model.Id)
    @Html.HiddenFor(model => model.OrderState)
    @Html.nbDropDownListFor(model => model.Category, "MaterialCategory")
    @Html.nbDateFor(model => model.ProcessDate).Required()
}
@section Down{
    @(Html.nbFormListFor<MaterialProcessItem>(s =>
    {
        s.ID("MaterialList");
        s.Action(@Url.Action("EditList"));
        s.ExtParam(new { OrderId = "$('#Id').val()", Category = @ViewBag.Category ?? "", date = @ViewBag.Date ?? "" });
        s.layoutW(10);
        s.layoutH(130);
        s.Columns(col =>
        {
            col.Bind(e => e.Id).IsKey();
            col.Bind(e => e.MaterialId).Hide();
            col.Bind(e => e.Code).Width(60);
            col.Bind(e => e.Name).Width(60).Align(GridAlign.Left);
            col.BindEnum(e => e.Category, "MaterialCategory").Width(60);
            col.Bind(e => e.ProcessCount).Width(60).Align(GridAlign.Right);
            col.Bind(e => e.ActualPickCount).Width(60).Align(GridAlign.Right);
            col.Bind(e => e.ActualStorageCount).Template(@Html.TextBox("ActualStorageCount", "${ProcessCount}", new { style = "text-align:right;width:56px" }).ToString()).Width(60);
        });
    }))
}
